package test2

/**
  * Created by Bane.Shi.
  * Copyright MoenSun
  * User: Bane.Shi
  * Date: 2017/7/27
  * Time: 20:52
  */
object MyModule {
  def abs(n:Int):Int =
    if (n<0) -n
    else n

  private def formatAbs(x:Int) = {
    val msg = "The absolute value of %d is %d"
    msg.format(x,abs(x))
  }

  def main(args: Array[String]):Unit =
    println(formatAbs(-42))

}
